<?php
	if(!empty($id)){ ?>
<script type="text/javascript">
$(document).ready(function() {
	$("#popup_<?php echo $id; ?>_cancel").click(function(e){
		$("#popup_<?php echo $id; ?>_cancel").trigger('close');
		e.preventDefault();
	  });
});
</script>
<div id="popup_<?php echo $id; ?>" class="popup" >
<?php  
	$hidden = array('refurl' => current_url());
	echo form_open($action."/$id/",'',$hidden);
?>
<div class="popup_body">
<h4>Choose a content type to insert</h4>

<?php
	
    $additional = 'class="popup_cm_chooser"';
	if(!empty($options)){ 
			echo form_dropdown('content_editor_type', $options,null, $additional);
	}
	?>
</div>
<div  class="pop_upcontrol">
<input type="button"  class="pop_up" id="popup_<?php echo $id; ?>_cancel" value="Cancel" />
<input type="submit"  class="pop_up" id="popup_<?php echo $id; ?>_create" value="Create" />
</div>
</form>
</div>
<?php }?> 
